function isAlphanumericSpace(event) {
	//var key = (document.all) ? event.keyCode : event.which;
      var key;
    var keychar;
        if (window.event)
        key = window.event.keyCode; else if (event)
        key = event.which; else
        return true;

    keychar = String.fromCharCode(key);

	if ((key >= 48 && key <= 57) || (key >= 65 && key <= 90) || (key >= 97 && key <= 122) || key == 209 || key == 241 || key == 32 || key == 0 || key == 8) {
		return true;
	}
	return false;
}

function isAlphanumeric(event) {
	//var key = (document.all) ? event.keyCode : event.which;
      var key;
    var keychar;
       if (window.event)
        key = window.event.keyCode; else if (event)
        key = event.which; else
        return true;

    keychar = String.fromCharCode(key);


	if ((key >= 48 && key <= 57) || (key >= 65 && key <= 90) || (key >= 97 && key <= 122) || key == 209 || key == 241 || key == 0 || key == 8) {
		return true;
	}
	return false;
}


function isPositiveNumeric(myfield, e, dec, frac) {
    var key;
    var keychar;
    if (window.event)
        key = window.event.keyCode; else if (e)
        key = e.which; else
        return true;
    keychar = String.fromCharCode(key);
    if ((key == null) || (key == 0) || (key == 8) || (key == 9) || (key == 27))
        return true; else if ((("0123456789").indexOf(keychar) > -1))
        return true; else if (keychar == ",") {
      return false;
    }
    else if (dec && (keychar == ".")) {
        return true;
    }
    else if (frac && keychar == "/") {
        return true;
    }else if (key == 13) {
        return false;
    } else return false;
}

function isNumeric(myfield, e, dec, frac) {
    var key;
    var keychar;
    if (window.event)
        key = window.event.keyCode; else if (e)
        key = e.which; else
        return true;
    keychar = String.fromCharCode(key);
    if ((key == null) || (key == 0) || (key == 8) || (key == 9) || (key == 27))
        return true; else if ((("0123456789").indexOf(keychar) > -1))
        return true; else if (keychar == ",") {
      return false;
    }
    else if (keychar == "-") {
        return  myfield.value.toString()=='';
    }
    else if (dec && (keychar == ".")) {
        return true;
    }
    else if (frac && keychar == "/") {
        return true;
    }else if (key == 13) {
        return false;
    } else return false;
}

function textObjectUpperCase(textObject) {
	textObject.value = textObject.value.toUpperCase() ;
}